package com.joysuch.wwyt.bp.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.joysuch.wwyt.core.bean.BaseAttachmentBean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@ApiModel(value = "物资记录")
public class BpStoreMaterialRecordBean implements Serializable {

    @ApiModelProperty("主键id")
    private Long id;

    @ApiModelProperty("类别:出库/报废/入库/盘点")
    private String type;

    @ApiModelProperty("类别:出库/报废 数据字典id")
    private Long typeId;

    @ApiModelProperty("物资id")
    private Long materialId;
    @ApiModelProperty("物资名称")
    private String materialName;

    @ApiModelProperty("出库/入库单号")
    private String orderNo;

    @ApiModelProperty("物资旧的总量:返回前端展示,")
    private Double oldAmount;

    @ApiModelProperty("物资改变数量:出入库数量")
    private Double changeAmount;

    @ApiModelProperty("出库/入库/盘点时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date date;

    @ApiModelProperty("物资新的总量:盘点时传盘点数量")
    private Double newAmount;

    @ApiModelProperty("仓管员id")
    private Long warehouseKeeperId;
    @ApiModelProperty("仓管员名称")
    private String warehouseKeeperName;

    @ApiModelProperty("交货单位id")
    private Long deliveryUnitId;
    @ApiModelProperty("交货单位名称")
    private String deliveryUnitName;

    @ApiModelProperty("运输单位id")
    private Long transportUnitId;
    @ApiModelProperty("运输单位名称")
    private String transportUnitName;

    @ApiModelProperty("登记员id")
    private Long registrationId;
    @ApiModelProperty("登记员名称")
    private String registrationName;

    @ApiModelProperty("登记时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date registrationDate;

    @ApiModelProperty("附件")
    private BaseAttachmentBean attachment;

    @ApiModelProperty("备注")
    private String remark;
}
